using System;
using System.Collections.Generic;
using UMC.Data;
namespace UMC.Wiki.Entities
{
public partial class SubjectContent
{
readonly static Action<SubjectContent,object>[] _SetValues=new Action<SubjectContent,object>[]{(r,t)=>r.Content=Reflection.ParseObject(t, r.Content),(r,t)=>r.ContentType=Reflection.ParseObject(t, r.ContentType),(r,t)=>r.DataJSON=Reflection.ParseObject(t, r.DataJSON),(r,t)=>r.Id=Reflection.ParseObject(t, r.Id)};
readonly static string[] _Columns=new string[]{"Content","ContentType","DataJSON","Id"};
protected override void SetValue(string name, object obv){
var index = Utility.Search(_Columns,name, StringComparer.CurrentCultureIgnoreCase);
if (index > -1)_SetValues[index](this, obv);
}
protected override void GetValues(Action<String, object> action){
AppendValue(action,"Content", this.Content);
AppendValue(action,"ContentType", this.ContentType);
AppendValue(action,"DataJSON", this.DataJSON);
AppendValue(action,"Id", this.Id);
}

 protected override RecordColumn[] GetColumns(){
 var cols = new RecordColumn[4];
cols[0]= RecordColumn.Column("Content",this.Content);
cols[1]= RecordColumn.Column("ContentType",this.ContentType);
cols[2]= RecordColumn.Column("DataJSON",this.DataJSON);
cols[3]= RecordColumn.Column("Id",this.Id);
return cols;
}

}
}

